//
//  NHTTPManage.h
//  News
//
//  Created by zhangtao on 2018/11/8.
//  Copyright © 2018 zt.td. All rights reserved.
//

#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>

NS_ASSUME_NONNULL_BEGIN

@interface NHTTPManage : NSObject


typedef void(^LCSuccessHandler)(id responseObject);
typedef void(^LCErrorHandler)(id error);

+(id)shareInstance;

-(void)afGet:(NSString *)url andParam:(NSDictionary *)param success:(LCSuccessHandler)success failture:(LCErrorHandler)failture;


-(void)afPOST:(NSString *)url andParam:(NSDictionary *)param success:(LCSuccessHandler)success failture:(LCErrorHandler)failture;


-(void)uploadImagesWithUrl:(NSString *)url andImages:(NSArray *)images andParam:(NSDictionary *)param success:(LCSuccessHandler)success fail:(LCErrorHandler)fail;

-(void)uploadImageWithUrl:(NSString *)url andParam:(NSDictionary *)param success:(LCSuccessHandler)success fail:(LCErrorHandler)fail;

-(NSData *)reSizeImage:(UIImage *)sourceImage maxSizeWithKB:(CGFloat)maxSize;




@end

NS_ASSUME_NONNULL_END
